/* tslint:disable */
/* eslint-disable */
/**
 * Admin.NET 通用权限开发平台
 * 让 .NET 开发更简单、更通用、更流行。整合最新技术，模块插件式开发，前后端分离，开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！</font></b></u>
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { WcstaskWarehousePageInput } from '../models/wcstask-page-input';

import { WcstaskInput, DeleteTaskInput } from '../models/wcstask-input';
import { AdminResultWcstask } from '../models/result-pagelist-wcstask';
import { serveConfig } from '../../utils/axios-utils';

// Some imports not used depending on template conditions
// @ts-ignore


/**
 * SysWechatUserApi - axios parameter creator
 * @exports
 */
export const WcstaskApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 获取WCS任务
         * @summary 获取WCS任务
         * @param {WcstaskWarehousePageInput} [body]
         */
        apiWcstaskPagePost: async (body?: WcstaskWarehousePageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/wcsTask/getWcsTaskPageList`;
            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options };
            const localVarHeaderParameter = {} as any;

            // 添加认证
            if (configuration && configuration.accessToken) {
                const accessToken = typeof configuration.accessToken === 'function'
                    ? await configuration.accessToken()
                    : await configuration.accessToken;
                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
            }

            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
            localVarRequestOptions.headers = { ...localVarHeaderParameter, ...options.headers };
            localVarRequestOptions.data = JSON.stringify(body || {});

            return {
                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                options: localVarRequestOptions,
            };
        },

        /**
         * 增加出入口
        */
        apiWcstaskAddPost: async (body?: WcstaskInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/wcsTask/insertWcsTask`;
            const localVarUrlObj = new URL(localVarPath, serveConfig.basePath);



            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options };
            const localVarHeaderParameter = {} as any;
            // 添加认证
            if (configuration && configuration.accessToken) {
                const accessToken = typeof configuration.accessToken === 'function'
                    ? await configuration.accessToken()
                    : await configuration.accessToken;
                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
            localVarRequestOptions.headers = { ...localVarHeaderParameter, ...options.headers };
            localVarRequestOptions.data = JSON.stringify(body || {});
            return {
                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                options: localVarRequestOptions,
            };

        },

        /**
         * 修改出入口
         */
        apiWcstaskUpdatePost: async (body?: WcstaskInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/wcsTask/updateWcsTask`;
            const localVarUrlObj = new URL(localVarPath, serveConfig.basePath);


            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            };
            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options };
            const localVarHeaderParameter = {} as any;
            // 添加认证
            if (configuration && configuration.accessToken) {
                const accessToken = typeof configuration.accessToken === 'function'
                    ? await configuration.accessToken()
                    : await configuration.accessToken;
                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;

            }
            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
            localVarRequestOptions.headers = { ...localVarHeaderParameter, ...options.headers };
            localVarRequestOptions.data = JSON.stringify(body || {});
            return {
                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                options: localVarRequestOptions,
            };

        },

        /**
         * 删除出入口
         */
        apiWcstaskDeletePost: async (body?: DeleteTaskInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/wcsTask/deleteWcsTask`;
            const localVarUrlObj = new URL(localVarPath, serveConfig.basePath);


            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            };
            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options };
            const localVarHeaderParameter = {} as any;
            // 添加认证
            if (configuration && configuration.accessToken) {
                const accessToken = typeof configuration.accessToken === 'function'
                    ? await configuration.accessToken()
                    : await configuration.accessToken;
                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;


            };
            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
            localVarRequestOptions.headers = { ...localVarHeaderParameter, ...options.headers };
            localVarRequestOptions.data = JSON.stringify(body || {});
            return {
                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                options: localVarRequestOptions,
            };


        },
    };
}
/**
 * 
 * @param configuration 
 * @returns 
 */
export const apiWcstaskApiFp = function (configuration?: Configuration) {
    return {
        /**
         * 获取出入口
         */
        async apiWcstaskPagePost(
            body?: WcstaskWarehousePageInput,
            options?: AxiosRequestConfig
        ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultWcstask>>> {
            const localVarAxiosArgs = await WcstaskApiAxiosParamCreator(configuration).apiWcstaskPagePost(body, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                return axios.request(axiosRequestArgs);
            };
        },

        /**
         * 增加出入口
         */
        async apiWcstaskAddPost(
            body?: WcstaskInput,
            options?: AxiosRequestConfig
        ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
            const localVarAxiosArgs = await WcstaskApiAxiosParamCreator(configuration).apiWcstaskAddPost(body, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                return axios.request(axiosRequestArgs);
            };
        },

        /**
         * 修改出入口
         */        async apiWcstaskUpdatePost(
            body?: WcstaskInput,
            options?: AxiosRequestConfig
        ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
            const localVarAxiosArgs = await WcstaskApiAxiosParamCreator(configuration).apiWcstaskUpdatePost(body, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                return axios.request(axiosRequestArgs);
            };
        },

        /**
         * 删除出入口
         * 
         * 
         */        async apiWcstaskDeletePost(
            id?: DeleteTaskInput,
            options?: AxiosRequestConfig
        ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
            const localVarAxiosArgs = await WcstaskApiAxiosParamCreator(configuration).apiWcstaskDeletePost(id, options);
            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                return axios.request(axiosRequestArgs);
            };
        },


        // ... existing code ...



    };
};
/**
 * WcstaskApi - object-oriented interface
 * @export
 * @class WcstaskApi
 * @extends {BaseAPI}
 */
export class WcstaskApi extends BaseAPI {
    /**
     * 
     * @summary 获取出入口
     * @param {WcstaskWarehousePageInput} [body] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof WcstaskApi
     */
    public async apiWcstaskPagePost(body?: WcstaskWarehousePageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultWcstask>> {
        return apiWcstaskApiFp(this.configuration).apiWcstaskPagePost(body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 增加出入口
     * @param {WcstaskInput} [body] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof WcstaskApi
     */
    public async apiWcstaskAddPost(body?: WcstaskInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
        return apiWcstaskApiFp(this.configuration).apiWcstaskAddPost(body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 修改出入口
     * @param {WcstaskInput} [body] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof WcstaskApi
     */
    public async apiWcstaskUpdatePost(body?: WcstaskInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
        return apiWcstaskApiFp(this.configuration).apiWcstaskUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
    }

    /**
     * 
     * @summary 删除出入口
     * @param {DeleteWcstaskInput} [body] 
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof WcstaskApi
     */
    public async apiWcstaskDeletePost(body?: DeleteTaskInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
        return apiWcstaskApiFp(this.configuration).apiWcstaskDeletePost(body, options).then((request) => request(this.axios, this.basePath));
    }
}
import { axiosInstance } from '/@/utils/axios-utils'

const BaseUrl = (window as any).__env__.VITE_API_URL
interface ResponseDate<T = any> {
    code: string,
    message: string,
    result: T
}
/**
 * 批量解冻 冻结库存管理
 */
export function BatchUpdateStatusApi(data: any[]) {
    return axiosInstance<ResponseDate>({

        url: BaseUrl + '/api/inventory/UpdateInventoryStatus',
        method: 'POST',
        data
    })
}
//启动
export function BatchTaskStartApi(data: any[]) {
    return axiosInstance<ResponseDate>({

        url: BaseUrl + '/api/WcsTask/UpdateWcsTaskStatusStart',
        method: 'POST',
        data
    })
}
//取消
export function BatchTaskCancelApi(data: any[]) {
    return axiosInstance<ResponseDate>({
        
        url: BaseUrl + '/api/WcsTask/UpdateWcsTaskStatusCancel',
        method: 'POST',
        data
    })
}

/**
 * 导出
 */
export function WcstaskexportApi(data: any) {


    return axiosInstance<Blob>({
        responseType: 'blob',
        method: 'post',
        url: BaseUrl + '/api/wcsTask/WcsTaskExport',
        data,
    })
}

/** 
 * 暂存入库操作
 * @param file 导入的文件对象
 * @returns 导入文件操作的响应结果
 */
export function TemporarilyWcstaskeinportApi(formData: any) {
    return axiosInstance<ResponseDate>({
        // responseType: 'blob',

        url: BaseUrl+'/api/InventorySFP/TemporaryWcsimport',
        method: 'POST',
        data: formData
    });
}

/** 
* 下载接口
* @param data 下载所需参数
* @returns 下载文件的响应
*/
export function DownloadWcstaskeApi(params?: Record<string, any>) {
    return axiosInstance<Blob>({
        responseType: 'blob',
        url: BaseUrl + '/api/wcsTask/DownloadWcsTask',
        method: 'POST',
        params
    });
}
/**
 * 优先下发
 * @param params 
 * @returns
 * @returns 
 */
export function apiWcstaskEmergencyOperationPost(data: any[]) {
    return axiosInstance<ResponseDate>({
        url: BaseUrl + '/api/wcsTask/WcstaskEmergency',
        method: 'POST',
        data
    });
}
/**
 * 更新下发agv的状态
 * @param params 
 * @returns
 * @returns 
 */
export function apiUpdateAgvactionsPost(data: any[]) {
    return axiosInstance<ResponseDate>({
        url: BaseUrl + '/api/Dispatch/UpdateAgvactions',
        method: 'POST',
        data
    });
}
/**
* 返回当前最大
* @param params 
* @returns
* @returns 
*/
export function apiWcstaskMAxPost(data: any) {
    return axiosInstance<ResponseDate>({
        url: BaseUrl + '/api/wcsTask/GetMaxnumberWcs',
        method: 'POST',
        data
    });
}

/** 
* 导入文件操作
* @param file 导入的文件对象
* @returns 导入文件操作的响应结果
*/
export function WcstaskeinportApi(formData: any) {
    return axiosInstance<ResponseDate>({
        //responseType: 'blob',
        url: BaseUrl + '/api/wcsTask/ImportWarehouse',
        method: 'POST',
        data: formData
    });
}
/**
* 返回任务的下发步骤
* @param params 
* @returns
* @returns 
*/
export function GetAgvActionPageList(data: any) {
    return axiosInstance<ResponseDate>({
        url: BaseUrl + '/api/Dispatch/GetAgvActionPageList',
        method: 'POST',
        data
    });
}

//批量删除
export function BatchDeleteAPi(data: any[]) {
    return axiosInstance<ResponseDate>({
        
        url: BaseUrl + '/api/WcsTask/BatchDeleteWcsTask',
        method: 'Delete',
        data
    })
}

